package com.jiawa.train.business.controller.admin;

import com.jiawa.train.business.domain.Req.ConfirmOrderQueryReq;
import com.jiawa.train.business.domain.resp.ConfirmOrderQueryResp;
import com.jiawa.train.business.service.ConfirmOrderService;
import com.jiawa.train.common.resp.CommonResp;
import com.jiawa.train.common.resp.PageResp;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/confirm-order")
public class AdminConfirmOrderController {

    @Autowired
    private ConfirmOrderService confirmOrderService;

    @GetMapping("/query-list")
    public CommonResp<PageResp<ConfirmOrderQueryResp>> queryList(@Valid ConfirmOrderQueryReq confirmOrderQueryReq) {
        PageResp<ConfirmOrderQueryResp> queryList = confirmOrderService.queryList(confirmOrderQueryReq);
        return new CommonResp<>(queryList);
    }


}
